Hash `Kind` in metadata for crates
authorAlex Crichton <alex@alexcrichton.com>
Wed, 14 Jun 2017 18:16:24 +0000 (11:16 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 14 Jun 2017 18:16:24 +0000 (11:16 -0700)
commit73216cb91b7cd3a33d3121dcb6216d848b00221c
tree7b60e354f7f003e8a390252ca146247507840ea7
parent45148e0efdc1ea23a2e46b44cae51b746751412a
Hash `Kind` in metadata for crates

This fixes what is now a bug in Cargo discovered when attempting to land
rust-lang/rust#42495 where Cargo will compile both host and target artifacts
with the same `-C metadata` flag. This means that the compile can load two
crates with the same SVH that are supposed to be distinct, which causes weird
bugs with crate loading and whatnot.

This commit throws in the `Kind` into the metadata calculation to resolve this
to ensure that host/target artifacts always have a different `-C metadata`
src/cargo/ops/cargo_rustc/context.rs